#!/usr/bin/env bash

cd $OHOS_TOOL
source libs/include.sh
include "libs/auto_update.sh"
include "libs/database.sh"
include "libs/output.sh"

function ohos-tool-update:main()
{
    database:global_load
    if [ "$(database:global_get git_update)" = "true" ]; then
        if ! auto_update:check_new; then
            auto_update:fetch_new &
        fi
    fi
}

ohos-tool-update:main
